feat(Pagination): accessibility tweaks & add unit tests#1903
feat(Pagination): accessibility tweaks & add unit tests#1903kasya merged 12 commits intoOWASP:mainfrom
Conversation
Summary by CodeRabbit
WalkthroughA new unit test suite was added for the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Assessment against linked issues
Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
This is a clean replacement for #1879, which included unrelated files by mistake. Only the scoped changes for the Pagination component are included here:
thanks for the earlier review! Looking forward to feedback on this cleaned-up version. |
|
I've verified the changes locally by running make check — all frontend-related tests and checks passed. |
|
kasya
left a comment
There was a problem hiding this comment.
Thanks for adding accessibility issues!
Next time make sure you run make check before committing changes 👌🏼
Thank you for the guidance and for bearing with me! |




Proposed change
This is a clean version of the earlier PR #1879, which mistakenly included unrelated files.
Closes #1864
Replaces #1879
Summary
This PR introduces:
<Pagination />component:type="button"on all<Button>elements to prevent unintended form submissionsaria-current="page"on the active page for improved screen reader supportaria-label="More pages"used for ellipsis indicators instead ofdata-testid__tests__/unit/components/Pagination.test.tsxthat cover:isLoaded = false,totalPages <= 1)onPageChangecallback functionalityChecklist
make check-testlocally; all checks and tests passed.